public class User {
    private String account;
    private String password;
    private String email;

    // 构造函数，账号与密码必填，邮箱可选填
    public User(String account, String password, String email) {
        this.account = account;
        this.password = password;
        if (email!= null) {
            this.email = email;
        }
    }

    // 用户信息展示方法
    public void showUserInfo() {
        System.out.println("账号: " + account);
        System.out.println("密码: " + password);
        if (email!= null) {
            System.out.println("邮箱: " + email);
        } else {
            System.out.println("邮箱: 未填写");
        }
    }

    public static void main(String[] args) {
        User user1 = new User("user123", "123456", "user123@example.com");
        User user2 = new User("user456", "abcdef", null);

        user1.showUserInfo();
        System.out.println("----------------");
        user2.showUserInfo();
    }
}